	<?php 
		$title = 'title_'.$this->lang;
		foreach($category as $item) 
		{
			if( $item->layer_id == 1 )
			{
				if( ($item->right_id - $item->left_id) > 1 )
				{
					$parent_right_id = $item->right_id;
					//echo '<h3>'.$item->$title.'</h3>';
				
	?>
<div class="mainbox forumlist">
    <table cellspacing="0" cellpadding="0" style="" summary="category1" id="category_1">
    	<caption><?=$item->$title?></caption>
        <thead class="category"><tr>
            <th>版块</th>
            <td class="nums">主题</td>
            <td class="nums">帖数</td>
            <td class="lastpost">最后发表</td>
        </tr></thead>
        <tbody>
	<?php
				}
			}
			else
			{
	?>
        <tr>
            <th class="new"><h2><?=html::anchor('forum/category/'.$item->id.'/1', $item->$title)?><em> (今日: <?=$item->today_posts?>)</em></h2></th>
            <td class="nums"><?=$item->topics?></td>
            <td class="nums"><?=$item->posts?></td>
            <td class="lastpost">
            <?php if( ! empty($item->last_topic) ) { ?>
                <?=html::anchor('forum/topic/'.$item->id.'/'.$item->last_topic_id, $item->last_topic)?>
                <cite>by <?=$item->last_topic_username?> - <?=$item->last_topic_at?></cite>
			<?php } else { echo '&#160;'; } ?>
            </td>
        </tr>
	<?php
				
				if ( ($parent_right_id-$item->right_id) == 1 ) 
				{
					echo '</tbody></table></div>';
				}
			}
		} 
	?>

